package com.gem.eolane.web;
import com.gem.eolane.service.AdminService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.stereotype.Controller;
//后台不拦截
@Controller
@RequestMapping("/a/t")
public class TBackInterfaceController {
    @Autowired
    private AdminService adminService;

    //========================刘hui=======================
    //后台登录
    @RequestMapping("/hlogin")
    public String hlogin() {
        return "backstagepage/hlogin";
    }


   /* //后台密码用户判断
    @RequestMapping("/backList")
    public String backList(String adminNumber, String password, Model model, HttpSession session, HttpServletRequest request) {
        System.out.println(adminNumber + password);
        Admin admin = adminService.findQueryUser(adminNumber);
        session =  request.getSession();
        Admin admin1 = (Admin) session.getAttribute("admin");
        System.out.println("sess:"+admin1);
        if (admin1 == null) {
            Integer flag = 0;
            if (admin != null) {
                if (Enande.decrypt(admin.getPassword()).equals(password)) {
                    model.addAttribute("admin", admin);
                    session.setAttribute("admin", admin);
                    return "backstagepage/index";
                } else {
                    flag = 1;
                    model.addAttribute("flag", flag);
                    return "backstagepage/hlogin";
                }
            }
            flag = 2;
            model.addAttribute("flag", flag);
            return "backstagepage/hlogin";
        } else {
            model.addAttribute("admin", admin1);
            return "backstagepage/index";
        }
    }*/
//========================刘hui=======================

//========================公共界面=====================

    //后台返回快捷打样
    @RequestMapping("/relayout")
    public String demo11() {
        return "backstagepage/Layout";
    }

    //后台快捷打样订单详情
    @RequestMapping("/laydetalles")
    public String demo14() {
        return "backstagepage/Layoutvalue";
    }


    //后台添加新闻
    @RequestMapping("/addnews")
    public String add() {
        return "backstagepage/add_categroy";
    }

    //后台新闻详情
    @RequestMapping("/newdetail")
    public String filmForm() {
        return "backstagepage/newdetalle";
    }


}
